<extend name="Public/base"/>
<block name="rightbox">
    <div class="rightbox">
        <!-- block -->
        <div class="block">
            <div class="ibox-title">
                <img src="__IMG__/right_top1.png" style="margin-bottom: 15px;">
            </div>
            <div class="block-content collapse in" style="width: 95%;margin-left: 25px;">
                <div class="span12">
                    <p>
                        <a class="btn btn-success" href="{:U('Menus/menu_add',array('pid'=>I('get.pid',0)))}">新增</a>
                        <!--<button class="btn ajax-post confirm btn-success" url="{:U('del')}" target-form="ids">删 除</button>-->
                    </p>
                    <table class="table">
                        <thead>
                        <tr>
                            <th class="row-selected">
                                <input class="checkbox check-all" type="checkbox">
                            </th>
                            <th>ID</th>
                            <th>名称</th>
                            <th>上级菜单</th>
                            <th>分组</th>
                            <th>URL</th>
                            <th>排序</th>
                            <th>隐藏</th>
                            <th>操作</th>
                        </tr>
                        <notempty name="list">
                            <volist name="list" id="menu">
                                <tr>
                                    <td><input class="ids row-selected" type="checkbox" name="id[]" value="{$menu.id}"></td>
                                    <td style="text-align: center">{$menu.id}</td>
                                    <td style="text-align: center">
                                        <a href="{:U('index?pid='.$menu['id'])}">{$menu.title}</a>
                                    </td>
                                    <td style="text-align: center">{$menu.up_title|default='无'}</td>
                                    <td style="text-align: center">{$menu.group}</td>
                                    <td style="text-align: center">{$menu.url}</td>
                                    <td style="text-align: center">{$menu.sort}</td>
                                    <td style="text-align: center">
                                        <a href="{:U('toogleHide',array('id'=>$menu['id'],'value'=>abs($menu['hide']-1)))}" class="ajax-get">
                                            {$menu.hide_text}
                                        </a>
                                    </td>
                                    <td style="text-align: center">
                                        <a title="编辑" href="{:U('edit?id='.$menu['id'])}">编辑</a>
                                        <a class="confirm " title="删除" href="{:U('del?id='.$menu['id'])}">删除</a>
                                    </td>
                                </tr>
                            </volist>
                            <else/>
                            <td colspan="10" class="text-center"> aOh! 暂时还没有内容! </td>
                        </notempty>
                    </table>
                </div>
            </div>
        </div>
        <!-- /block -->
    </div>
</block>